const obj = {
  _name: 'why',
  get name() {
    return this._name
  },
  set name(newVal) {
    this._name = newVal
  }
}

const objProxy = new Proxy(obj, {
  get: function(target, key, receiver) {
    // receiver 创建出来的代理对象
    console.log("get方法被访问------", key, receiver)
    console.log(objProxy === receiver)
    return Reflect.get(target, key, receiver)
  },
  set: function(target, key, newVal, receiver) {
    // receiver 创建出来的代理对象
    console.log("set方法被访问------", key, receiver)
    Reflect.set(target, key, newVal, receiver)
  }
})

objProxy.name = 'jelly'